<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkCellRendererSpin: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="prev" href="GtkCellRendererProgress.html" title="GtkCellRendererProgress">
<link rel="next" href="GtkCellRendererText.html" title="GtkCellRendererText">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GtkCellRendererSpin.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GtkCellRendererSpin.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GtkCellRendererSpin.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="TreeWidgetObjects.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkCellRendererProgress.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkCellRendererText.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkCellRendererSpin"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkCellRendererSpin.top_of_page"></a>GtkCellRendererSpin</span></h2>
<p>GtkCellRendererSpin — Renders a spin button in a cell</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkCellRendererSpin.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody><tr>
<td class="function_type">
<a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="returnvalue">GtkCellRenderer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCellRendererSpin.html#gtk-cell-renderer-spin-new" title="gtk_cell_renderer_spin_new ()">gtk_cell_renderer_spin_new</a> <span class="c_punctuation">()</span>
</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> *</td>
<td class="property_name"><a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin--adjustment" title="The “adjustment” property">adjustment</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">double</span></td>
<td class="property_name"><a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin--climb-rate" title="The “climb-rate” property">climb-rate</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">guint</span></td>
<td class="property_name"><a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin--digits" title="The “digits” property">digits</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin-struct" title="struct GtkCellRendererSpin">GtkCellRendererSpin</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GInitiallyUnowned
        <span class="lineart">╰──</span> <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a>
            <span class="lineart">╰──</span> <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText">GtkCellRendererText</a>
                <span class="lineart">╰──</span> GtkCellRendererSpin
</pre>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.description"></a><h2>Description</h2>
<p><a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a> renders text in a cell like <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> from
which it is derived. But while <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> offers a simple entry to
edit the text, <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a> offers a <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a> widget. Of course,
that means that the text has to be parseable as a floating point number.</p>
<p>The range of the spinbutton is taken from the adjustment property of the
cell renderer, which can be set explicitly or mapped to a column in the
tree model, like all properties of cell renders. <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a>
also has properties for the <a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin--climb-rate" title="The “climb-rate” property"><span class="type">“climb-rate”</span></a> and the number
of <a class="link" href="GtkCellRendererSpin.html#GtkCellRendererSpin--digits" title="The “digits” property"><span class="type">“digits”</span></a> to display. Other <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a> properties
can be set in a handler for the <a class="link" href="GtkCellRenderer.html#GtkCellRenderer-editing-started" title="The “editing-started” signal"><span class="type">“editing-started”</span></a> signal.</p>
<p>The <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a> cell renderer was added in GTK+ 2.10.</p>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-cell-renderer-spin-new"></a><h3>gtk_cell_renderer_spin_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="returnvalue">GtkCellRenderer</span></a> *
gtk_cell_renderer_spin_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a>.</p>
<div class="refsect3">
<a name="gtk-cell-renderer-spin-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GtkCellRendererSpin.html" title="GtkCellRendererSpin"><span class="type">GtkCellRendererSpin</span></a></p>
</div>
<p class="since">Since: 2.10</p>
</div>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkCellRendererSpin-struct"></a><h3>struct GtkCellRendererSpin</h3>
<pre class="programlisting">struct GtkCellRendererSpin;</pre>
</div>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkCellRendererSpin--adjustment"></a><h3>The <code class="literal">“adjustment”</code> property</h3>
<pre class="programlisting">  “adjustment”               <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> *</pre>
<p>The adjustment that holds the value of the spinbutton.

This must be non-<code class="literal">NULL</code> for the cell renderer to be editable.</p>
<p>Owner: GtkCellRendererSpin</p>
<p>Flags: Read / Write</p>
<p class="since">Since: 2.10</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellRendererSpin--climb-rate"></a><h3>The <code class="literal">“climb-rate”</code> property</h3>
<pre class="programlisting">  “climb-rate”               <span class="type">double</span></pre>
<p>The acceleration rate when you hold down a button.</p>
<p>Owner: GtkCellRendererSpin</p>
<p>Flags: Read / Write</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 0</p>
<p class="since">Since: 2.10</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellRendererSpin--digits"></a><h3>The <code class="literal">“digits”</code> property</h3>
<pre class="programlisting">  “digits”                   <span class="type">guint</span></pre>
<p>The number of decimal places to display.</p>
<p>Owner: GtkCellRendererSpin</p>
<p>Flags: Read / Write</p>
<p>Allowed values: &lt;= 20</p>
<p>Default value: 0</p>
<p class="since">Since: 2.10</p>
</div>
</div>
<div class="refsect1">
<a name="GtkCellRendererSpin.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a>, <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>